# -*- coding: utf8 -*-
'''
    1.2.3 交互式标注
'''

from PIL import Image
from pylab import array, imshow, ginput, show

infile = 'img/haizei.jpg'

# 读取图像到数组中
im = array(Image.open(infile))

# 绘制图像
imshow(im)

# 点击3次
print('Please click 3 points')

# ginput()函数会接收用户的操作
x = ginput(3)
print('you clicked:', x)

show()
